package com.xiaoke.utils;

import com.xiaoke.domain.dto.CreateArticleDTO;
import com.xiaoke.domain.entity.Article;

public class ArticleUtils {
    public static String getDigest(String s) {
        String digest = MarkdownUtils.conversionMarkdownToText(s);
        if(digest.length() > 200) {
            digest =  digest.substring(0,200);
        }
        digest= digest.replaceAll("\\s+", " ");
        return  digest;
    }
}
